<%-- 
    Document   : register
    Created on : 10 Dec, 2009, 9:29:06 PM
    Author     : Insect
--%>

<%@page contentType="text/html" pageEncoding="windows-1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
        <title>Register</title>
        <script language="javascript">
            function validate(){
                var userName = document.getElementById('username').value;
                var password = document.getElementById('password').value;
                var confirmedPassword = document.getElementById('confirmedPassword').value;
                if(userName == '' || password == '' || confirmedPassword == ''){
                    alert('All the fileds in the page are mandatory. Plese enter all the field values.');
                    return false;
                }
                if(password != confirmedPassword){
                    alert('Password & Confirmed password do not match. Plase enter agian.');
                    document.getElementById('password').value='';
                    document.getElementById('confirmedPassword').value='';
                    document.getElementById('password').focus();
                    return false;
                }
                return true;
            }
        </script>
    </head>
    <body>
        <form id="register" action="../register" method="post" onsubmit="return validate();">
            <table>
                <tr>
                    <td>Desired Username: </td><td><input type="text" size="30" id="username" name="username"></td>
                </tr>
                <tr>
                    <td>Password: </td><td><input type="password" size="30" id="password" name="password"></td>
                </tr>
                <tr>
                    <td>Confirm Password: </td><td><input type="password" size="30" id="confirmedPassword"></td>
                </tr>
                <tr>
                    <td align="center"><input type="submit" value="Register" id="submit" ></td>
                </tr>
            </table>
        </form>
    </body>
</html>
